home *** CD-ROM | disk | FTP | other *** search
- ;
- ; $VER: Install MultiView Preferences 3.2 (26.03.98)
- ;
- ; Installer script for MultiView Preferences.
- ;
-
- (set #english-lang 1)
- (set #polish-lang 2)
-
- ; Get current language (no need for lots of silly icons! ;). However, this
- ; won't properly work for all versions of the Installer. Some don't
- ; understand the language "default" in the tool types... :/
-
- (if (= (exists "Env:Language") 1)
- ; GetEnv reports "String too long" if the variable doesn't exist! :/
- ; Dunno if this is fixed in V43... But we need to check anyway.
- (set @language (getenv "language"))
- )
-
-
- ;**************************************************************************
- ;
- ; English strings
- ;
-
- (set #default-lang #english-lang)
- (set #builtin-lang "(built in)")
- (set #bad-kick "You must have AmigaOS Release 2.04 or higher to use MultiView.")
- (set #install-parts "Please select the parts you wish to install")
- (set #item-program "MultiView")
- (set #item-guide "MultiViewPrefs.guide")
-
- (set #parts-header-help
- (cat
- " Here you select the different parts of MultiView that you would like to "
- "install. After that, you select the details of the installation (such as "
- "where the different files should be installed). You may choose to install "
- "the following items:\n"
- )
- )
-
- (set #item-program-help
- (cat
- " MultiView: This program is a configuration program for my MultiView"
- "and should be installed in SYS:Prefs/ directory.\n"
- )
- )
-
- (set #item-guide-help
- (cat
- " MultiViewPrefs.guide: The manual, in AmigaGuide® format. It contains "
- "some general information about MultiView Preferences.\n"
- )
- )
-
- (set #parts-footer-help
- (cat
- " For more information about these items, please see the manual.\n"
- )
- )
-
- ; Only for expert users
- (set #where-program "Where would you like to install Main program?")
- (set #where-program-help
- (cat
- " MultiView: This program is a configuration program for my MultiView"
- "and should be installed in SYS:Prefs/ directory.\n"
- )
- )
-
- (set #where-guide "Where would you like to install MultiViewPrefs.guide?")
-
- (set #where-guide-help
- (cat
- " MultiViewPrefs.guide is a file in the standard AmigaGuide® format. "
- "As MultiView currently makes specific use of this file, you can install "
- "it whereever you find convenient. If you have OS 3.0 or higher, "
- "one such place is \"Help:\", as this is where other AmigaGuide® "
- "files often are installed.\n"
- )
- )
-
- ; Only for expert users, and an icon wasn't found
- (set #copy-guide-icon "Do you want to install the icon for MultiViewPrefs.guide?")
-
- (set #copy-guide-icon-help
- (cat
- " Since you stated that you are an expert user, and there currently "
- "is no icon for MultiViewPrefs.guide where you selected to install it, "
- "you get a chance to decide if the icon should be installed as well.\n"
- )
- )
-
- (set #copy "Copying %s to %s...")
-
- ;**************************************************************************
- ;
- ; Polish strings
- ;
-
- (if (= @language "polski")
- (
- (set #default-lang #polski-lang)
- (set #builtin-lang "(wbudowany)")
- (set #bad-kick "Musisz mieê system w wersji przynajmniej 2.04.")
- (set #install-parts "Wybierz czëôci, które chcesz zainstalowaê")
- (set #item-program "MultiView")
- (set #item-guide "MultiViewPrefs.guide")
-
- (set #parts-header-help
- (cat
- " Tu moûesz wybraê poszczególne czëôci pakietu do zainstalowania. Potem "
- "wybierzesz gdzie chcesz je zainstalowaê. Do wyboru masz :\n"
- )
- )
-
- (set #item-program-help
- (cat
- " MultiView: To jest program konfiguracyjny dla mojego MultiView-a "
- "Powinieneô zainstalowaê go w katalogu SYS:Prefs/.\n"
- )
- )
-
- (set #item-guide-help
- (cat
- " MultiViewPrefs.guide: Dokumentacja w formacie AmigaGuide®.\n"
- )
- )
-
- (set #parts-footer-help
- (cat
- " Dodatkowe informacje znajdziesz w dokumentacji.\n\n"
- )
- )
-
- ; Only for expert users
- (set #where-program "Gdzie chcesz zainstalowaê gîówny program?")
- (set #where-program-help
- (cat
- " MultiView: To jest program konfiguracyjny dla mojego MultiView-a "
- "Powinieneô zainstalowaê go w katalogu SYS:Prefs/.\n"
- )
- )
-
- (set #where-guide "Gdzie chcesz zainstalowaê MultiViewPrefs.guide?")
- (set #where-guide-help
- (cat
- " MultiViewPrefs.guide jest plikiem w standardzie AmigaGuide®. "
- "Proponowanym miejscem jest HELP:\n"
- )
- )
-
- (set #copy-guide-icon "Czy chcesz zainstalowaê ikonë dla MultiViewPrefs.guide?")
- (set #copy "Kopiujë %s do %s...")
- )
- )
-
- ;**************************************************************************
- ;
- ; The actual installation script
- ;
- ; First some initializations
- ;
-
- ; Check Kickstart version. Exit if not at least 2.04
- (if (< (/ (getversion) 65536) 37)
- (abort #bad-kick)
- )
-
- ; Since files are scatter installed, don't mention any specific location.
- (set @default-dest "")
-
- ; Request proportinal fonts, if supported. This string is
- ; prepended to the first askoptions choice.
- (if (>= @installer-version 2752518) ; 42 * 65536 + 6
- ; At least version 42.6
- (set #propfont "p")
- ; Pre V42
- (set #propfont "")
- )
-
- (set #item-num-prog 1)
- (set #item-num-guide 2)
-
- ; Find out default values for parts to install
- (set #install-default (BITOR #item-num-prog #item-num-guide))
-
- ; Everything ready
-
- (welcome)
-
- ; Ask the user what to install
- (set #install-files
- (askoptions
- (prompt #install-parts)
- (help #parts-header-help
- #item-program-help
- #item-guide-help
- #parts-footer-help "\n"
- @askoptions-help)
- (choices
- (cat #propfont #item-program)
- #item-guide
- )
- (default #install-default)
- )
- )
-
- ; Ask the user for the location of all parts
-
- (set #program-dest "SYS:Prefs")
-
- ; Location for MultiView program (for experts)
- (if (AND (= @user-level 2) (BITAND #install-files #item-num-prog))
- (set #program-dest
- (askdir
- (prompt #where-program)
- (help #where-program-help "\n" @askdir-help)
- (default #program-dest)
- )
- )
- )
-
- ; Location for MultiViewPrefs.guide
- (if (BITAND #install-files #item-num-guide)
- (
- (set #guide-dest "Work:")
-
- (if (exists "Help:")
- (set #guide-dest "Help:")
- )
-
- (set #guide-dest
- (askdir
- (prompt #where-guide)
- (help #where-guide-help "\n" @askdir-help)
- (default #guide-dest)
- )
- )
-
- (set #dest-guide-name (tackon #guide-dest "MultiViewPrefs.guide.info"))
-
- (set #guide-icon
- (if (AND (= @user-level 2 ) (= (exists #dest-guide-name) 0))
- (askbool
- (prompt #copy-guide-icon)
- (help #copy-guide-icon-help " ")
- )
- 0 ; Default is to not copy the icon
- )
- )
- )
- )
-
- ; Everything set up. Now do the actual installation
-
- (complete 0)
-
- (if (BITAND #install-files #item-num-prog)
- (
- (copyfiles
- (prompt (#copy "MultiView" #program-dest))
- (source "Prefs/MultiView")
- (dest #program-dest)
- )
- (copyfiles
- (prompt (#copy "MultiView.info" #program-dest))
- (source "Prefs/MultiView.info")
- (dest #program-dest)
- )
- )
- )
-
- (complete 50)
-
- ;this part dont work because Workbench say"this icon haven't tool".where is the matter??
- (if (BITAND #install-files #item-num-guide)
- (
- (set #guide-source
- (tackon (tackon "Docs/" @language) "MultiViewPrefs.guide")
- )
- (copyfiles
- (prompt (#copy "MultiViewPrefs.guide" #guide-dest))
- (source #guide-source)
- (dest #guide-dest)
- )
-
- (if #guide-icon
- (
- (copyfiles
- (prompt (#copy "MultiViewPrefs.guide.info" #guide-dest))
- (source (tackon (tackon "Docs/" @language) "MultiViewPrefs.guide.info"))
- (dest #guide-dest)
- )
- )
- )
- )
- )
-
- (complete 100)
-
- (exit)
-